package io.zhiller.simpletemplate.utils.vanilla

import android.content.Context
import android.content.Intent
import android.os.Process
import io.zhiller.simpletemplate.MainActivity

object IntentUtils {
  fun restartApp(context: Context) {
    val intent = Intent(context, MainActivity::class.java) // 替换为你的应用启动Activity
    intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
    context.startActivity(intent)
    Process.killProcess(Process.myPid())
  }
}